home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
T-TPUG Old Monthly Disks
/
(c)ta.d64
/
math whiz.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
2KB
|
78 lines
1 PRINT"[147]"
2 POKE53280,0:POKE53281,0
10 PRINTTAB(12)"MATH WHIZ"
20 PRINT"1 -- ADDITION "
30 PRINT"2 -- SUBTRACTION "
40 PRINT"3 -- MULTIPLICATION "
50 PRINT"4 -- DIVISION "
60 PRINT"5 -- MULTIPLICATION TABLES"
70 PRINT"6 -- END PROGRAM "
75 PRINT:PRINT:INPUT"SELECT 1-6 ONLY";N
80 IFN>6THEN75
90 ONNGOTO200,300,400,500,800,1000
200 PRINT"[147]":CLR
201 PRINTTAB(11)"ADDITION PRACTICE"
210 GOSUB700
220 GOSUB720
230 PRINT:PRINTX;"+";Y;"=":INPUTA
240 Z=X+Y
250 IFA=ZTHENPRINT"CORRECT !!!":C=C+1:P=P+1:GOTO270
260 PRINT"WRONG."
262 PRINT"THE ANSWER WAS ";Z:P=P+1
270 IFR=PTHENPRINT"YOU GOT "C;" OUT OF "R;" RIGHT":GOSUB740
280 GOTO220
300 PRINT"[147]":CLR
301 PRINTTAB(11)"SUBTRACTION PRACTICE":CLR
310 GOSUB700
320 GOSUB720
330 PRINT:PRINTX;"-";Y;"=?":INPUTA
340 Z=X-Y
350 IFA=ZTHENPRINT"CORRECT !!!":C=C+1:P=P+1:GOTO370
360 PRINT"WRONG."
362 PRINT"THE ANSWER WAS ";Z:P=P+1
370 IFR=PTHENPRINT"YOU GOT "C;" OUT OF "R;" RIGHT":GOSUB740
380 GOTO320
400 PRINT"[147]":CLR
401 PRINTTAB(9)"MULTIPLICATION PRACTICE"
410 GOSUB700
420 GOSUB720
430 PRINT:PRINTX;"*";Y;"=?":PRINT
440 INPUT"YOUR ANSWER=";A:Z=X*Y
450 IFA=ZTHENPRINT"CORRECT":C=C+1:P=P+1:GOTO470
460 PRINT"WRONG."
462 PRINT"THE ANSWER WAS ";Z:P=P+1
470 IFR=PTHENPRINT"YOU GOT "C;" OUT OF "R;" RIGHT":GOSUB740
480 GOTO420
500 PRINT"[147]":CLR
501 PRINTTAB(11)"DIVISION PRACTICE"
510 GOSUB700
520 GOSUB720
525 IFX<YTHENGOTO520
530 PRINT:PRINTX;"/";Y;"=?":PRINT
550 Z=INT(X/Y):M=X-Z*Y
560 PRINT:INPUT"QUOTIENT=";Q
570 PRINT:INPUT"REMAINDER=";D
580 IFQ=ZANDD=MTHENPRINT"CORRECT":C=C+1:P=P+1:GOTO600
590 PRINT"WRONG."
592 PRINT"THE QUOTIENT WAS ";Z
594 PRINT"THE REMAINDER WAS ";M:P=P+1
600 IFR=PTHENPRINT"YOU GOT "C;" OUT OF "R;" RIGHT":GOSUB740
610 GOTO520
700 INPUT"HIGHEST NUMBER";H
710 INPUT"NUMBER OF PROBLEMS";R:RETURN
720 X=INT(H*RND(1))+1:Y=INT(H*RND(1))+1
730 RETURN
740 PRINT:INPUT"STUDY SOME MORE(Y/N)";A$
750 IFA$="Y"THENGOTO1
760 PRINT:PRINT"BYE BYE "
770 END
800 PRINT"[147]":CLR
801 PRINTTAB(9)"MULTIPLICATION TABLES":CLR
810 INPUT"MULTIPLIER TO STUDY";M
820 FORT=1TO10
830 D=T*M
840 PRINTT;" * "M;"=";D:PRINT
850 NEXTT
860 GOSUB740
1000 END